﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace app1_mycalculator
{
    public class OperDiv : BaseOperation, IOperate
    {
        public override double Calculate(double a, double b)
        {
            if (b == 0)
                throw new DivideByZeroException("除数不能为0");
            return a / b;
        }

        public double Divide(double a, double b) => Calculate(a, b);
    }
}
